package com.xyf.sys.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author R-H
 * @Date 2024/3/101639
 * @Description
 */
@Data
@ApiModel
public class OrderPayment {

    @ExcelProperty("姓名")
    @ApiModelProperty("姓名")
    private String name;

    @ExcelProperty(value = "日期", format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("日期")
    private String paymentDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty(value = "退款日期", format = "yyyy-MM-dd HH:mm:ss")
    private Date refundTime;

    @ExcelProperty("重量差")
    private String weightDiff;

    @ExcelProperty("打单重量")
    private String weight;

    @ExcelProperty("结算重量")
    private String settleWeight;

    @ApiModelProperty("金额")
    @ExcelProperty("金额")
    private BigDecimal amount;

    @ExcelProperty("超重金额")
    private BigDecimal overWeightAmount;

    @ExcelProperty("团长利润")
    private BigDecimal regimentProfit;

    @ExcelProperty("利润公式")
    private String profitFormula;

    @ExcelProperty("价格方案")
    private Long logisticPriceSchemeId;


    private String deliveryName;

    @ExcelProperty("物流单号")
    private String waybillId;

    @ApiModelProperty("业务描述")
    @ExcelProperty("业务描述")
    private String businessDescription;

    @ExcelIgnore
    @ApiModelProperty("订单id")
    private String orderId;

    @ExcelIgnore
    @ApiModelProperty("userId")
    private String userId;

    @ExcelIgnore
    private String productCategory;

    @ExcelIgnore
    private String orderType;

    private String receiverProvince;

    private String receiverMobile;

    private String receiverAddress;

    @ExcelProperty("说明")
    @ApiModelProperty("说明")
    private String note;

    @ExcelIgnore
    private Integer refundStatus;

    private String orderTypeFormat;

    private String userName;

    private String regimentName;

    private String payerName;

    private String deptName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;

    private String orderCode;

    private String goodsName;

    private String ownerName;

    private String receiverName;

    public String getOrderTypeFormat() {
        switch (orderType) {
            case "" :
                return "";
            case "1" :
                return "快递";
            case "2" :
                return "干洗";
            case "3" :
                return "团购";
            case "4" :
                return "团购";
            default :
                return "";
        }
    }
}
